<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>My First chart using FusionWidgets</title>
<script type="text/javascript" src="FusionCharts.js"></script>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="FusionCharts.jqueryplugin.js"></script>
<script type="text/javascript">
	function changeData(){
		var jsonData =		{
				 "chart": {
				        "showvalues": "1",
				        "numvdivlines": "10",
				        "canvasbgalpha":'0',
				        "bgAlpha":'0',
				        "bgImageAlpha":'0',
				        "legendPosition":'RIGHT'
				    },
			    "categories": [
			                   {
			                       "category": [
			                           {
			                               "label": "会话"
			                           }
			                       ]
			                   }
			               ],
			               "dataset": [
			                   {
			                       "seriesname": "活动",
			                       "data": [
			                           {
			                               "value": "15"
			                           }]
			                   },
			                   {
			                       "seriesname": "睡眠",
			                       "data": [
			                           {
			                               "value": "35"
			                           }
			                       ]
			                   }
			               ]
			           };
			
		var chart =$("#scChart");
		chart.updateFusionCharts({"dataSource": jsonData, "dataFormat": "json"});
	}
</script>
</head>
<body>
	<div id="scDiv">FusionWidgets will load here!</div>
	<button  onclick="changeData();">刷新</button>
	<script type="text/javascript">
	$(document).ready(
			function(){
				$("#scDiv").insertFusionCharts({
					swfUrl : "StackedColumn3D.swf",
					dataSource : "Data_SC.xml",
					dataFormat : "xmlurl",
					width : "200",
					height : "400",
					id : "scChart"
				});
			});       
 </script>
</body>
</html>